package com.power.sifa.approve.api;

import com.plf.common.domain.ResponseDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import com.power.sifa.approve.model.Apl_matter_attach;
import com.power.sifa.approve.model.pageInfo.Apl_matter_attachPageInfo;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 *  申请材料 Feign
 */
public interface IApl_matter_attachFeign {

    /**
     * 申请材料分页列表
     */
    @PostMapping("/apl_matter_attach/list")
    ResponseDTO list(@RequestBody Apl_matter_attachPageInfo apl_matter_attachPageInfo);

    /**
    * 查看申请材料
    */
    @GetMapping("/apl_matter_attach/view")
    ResponseDTO view(@RequestParam("id") String id);

    /**
    * 删除申请材料
    */
    @PostMapping("/apl_matter_attach/delete")
    ResponseDTO delete(@RequestParam("id") String id);

    ///**
    // * 查看申请材料 复合主键使用
    // */
    //@PostMapping("/apl_matter_attach/viewByPK")
    //ResponseDTO viewByPK(@RequestBody Apl_matter_attach.Apl_matter_attachPK pk);

    /**
     * 修改或保存申请材料
     */
    @PostMapping("/apl_matter_attach/save")
    ResponseDTO save(@RequestBody Apl_matter_attach  apl_matter_attach);

    ///**
    // * 删除申请材料 复合主键使用
    // */
    //@PostMapping("/apl_matter_attach/deleteByPK")
    //ResponseDTO deleteByPK(@RequestBody Apl_matter_attach.Apl_matter_attachPK pk);

    /**
     * 批量删除申请材料
     */
    @PostMapping("/apl_matter_attach/batchDel")
    ResponseDTO batchDel(@RequestParam("ids") String ids);

     /**
     * 导出excel
     */
    @PostMapping("/apl_matter_attach/output")
    void output(HttpServletResponse response, @RequestBody Apl_matter_attachPageInfo apl_matter_attachPageInfo);

     /**
     * 导出excel模板
     */
    @PostMapping("/apl_matter_attach/exportExcelTemplate")
    void exportExcelTemplate(HttpServletResponse response);

     /**
     *	导入excel
     */
    @PostMapping("/apl_matter_attach/importExcel")
    ResponseDTO importExcel(@RequestBody MultipartFile file) throws IOException ;

    /**
     * 初始化申请材料
     * @param applyid   申请id
     * @param matid     事项id
     * @return
     */
    @PostMapping("/apl_matter_attach/init")
    ResponseDTO init(@RequestParam("applyid") String applyid, @RequestParam("matid") String matid);

    /**
     * 根据申请id获取申请材料列表及附件
     * @param applyid   申请id
     * @return
     */
    @GetMapping("/apl_matter_attach/queryListByApplyid")
    ResponseDTO queryListByApplyid(@RequestParam("applyid") String applyid);

    /**
     * 下载所有材料
     * @param applyid   申请id
     * @param response
     * @throws Exception
     */
    @PostMapping("/apl_matter_attach/downloadMaterialAll")
    void downloadMaterialAll(@RequestParam("applyid") String applyid, HttpServletResponse response) throws Exception;

    /**
     * 查询第三人的材料
     * @param applyid
     * @return
     */
    @PostMapping("/apl_matter_attach/queryThirdPersonMaterial")
    ResponseDTO queryThirdPersonMaterial(String applyid);
}
